package com.cstor.liang.mapper;

import com.cstor.liang.pojo.entity.Authority;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Administrator on 2017/9/3.
 */
@Mapper
public interface AuthorityMapper extends GoMapper<Authority> {

    @Select(" SELECT a.id, a.name, a.chinese FROM authority a JOIN link_role_authority l ON a.id = l.authority_id " +
            " WHERE l.role_id = #{roleId} ")
    List<Authority> listByRoleId(Integer roleId);
}
